<?php
/**
 * Created by PhpStorm.
 * User: guo
 * Date: 2019-03-26
 * Time: 19:28
 */

namespace app\log;

use app\log\model\Log as LogModel;

class Log
{
    /**
     * 日志
     * @param $tagTitle
     * @param $content
     */
    public static function saveLog($tagTitle, $content)
    {
        $logModel = new LogModel();

        $data = [
            'tag_title' => $tagTitle,
            'content' => json_encode($content,true),
            'create_time' => date('Y-m-d H:i:s')
        ];

        $logModel->save($data);
    }
}
